-
Notifications
You must be signed in to change notification settings - Fork 687
GH-2247 - Add repository initialization metrics. #2273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds initial support for collecting data repository startup metrics using core framework ApplicationStartup and StartupStep. Collected metrics can be stored with Java Flight Recorder when using a FlightRecorderApplicationStartup.
Adds a StartupStep for the creation of the target SD module Repository object (e.g. SD JPA). This could vary significantly from 1 SD module to another. Adds a StartupStep for the creation of the SD Repository Proxy. Renames the StartupStep wrapping the Repository composition logic to 'spring.data.repository.composition'. Moves the construction/initialization of the ApplicationStartup instance after the assertions in the getRepository(..) method.
Add the interface type name the repository is created for, query executors, as well as the number of fragments and measurements about potential post processors.
This commit adds application startup metrics for the time taken to scan the context for Spring Data repositories on a per module (JPA, MongoDB,...) base. We capture the module name, the scan base package and the number of repositories found. { "startupStep": { "name": "spring.data.repository.scanning", "id": ..., "parentId": ..., "tags": [ { "key": "data-module", "value": "MongoDB" }, { "key": "packages", "value": "com.example.demo" }, { "key": "repository.count", "value": "1" } ] } }
Make spring.data.repository.postprocessors conditional to reduce the number of events. Append full fragment diagnostics.
42be28e
to
579ca77
Compare
Rebased and force-pushed. |
Reorder methods
Reorder methods, add author tag, reformat code.
mp911de
pushed a commit
that referenced
this pull request
Jan 28, 2021
This commit adds support for collecting data repository startup metric (repository scanning, repository initialization) using core framework ApplicationStartup and StartupStep. Collected metrics can be stored with Java Flight Recorder when using a FlightRecorderApplicationStartup. Closes #2247. Original pull request: #2273.
That's merged and polished now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for collecting data repository startup metrics using core framework
ApplicationStartup
andStartupStep
.Collected metrics can be stored with Java Flight Recorder when using a
FlightRecorderApplicationStartup
or exposed via Spring Bootstartup
Actuator endpointhttp POST :/actuator/startup
Metrics are collected under
spring.data.repository
and contain the overallinit
time, as well as information about post processing, metadata collection, etc.Specifics about the number of repository fragments or the repository interface type are provided via
tags
as shown in the snippet below.Closes #2247